package com.piggy.logi.sys.mapper;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.piggy.logi.sys.domain.LogiCarrierContract;
import com.piggy.common.core.web.page.BaseMapperPlus;

import java.util.List;

/**
 * 承运商合同Mapper接口
 */
public interface LogiCarrierContractMapper extends BaseMapperPlus<LogiCarrierContract> {

    default List<LogiCarrierContract> selectByCarrierId(Long carrierId) {
        return selectList(Wrappers.<LogiCarrierContract>lambdaQuery().eq(LogiCarrierContract::getCarrierId, carrierId));
    }

    default void removeByCarrierId(Long carrierId) {
        delete(Wrappers.<LogiCarrierContract>lambdaQuery().eq(LogiCarrierContract::getCarrierId, carrierId));
    }
}
